Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 5 - Menu Manager Reference / Menu Manager Functions
Responding to the User's Choice of a Menu Command /


IsShowContextualMenuClick

NEW WITH CONTEXTUAL MENUS

Determines whether a particular event could invoke a contextual menu.

pascal Boolean IsShowContextualMenuClick(const EventRecord* inEvent);
inEvent
A pointer to the event structure that describes the event to examine.
function result
Returns a Boolean value indicating whether or not a contextual menu should be displayed. If true, the contextual menu should be displayed; if false, not.
DISCUSSION
Before calling the IsShowContextualMenuClick function, you should call InitContextualMenus. If no error is returned, you can then call IsShowContextualMenuClick.

Applications should call IsShowContextualMenuClick when they receive non-null events. If IsShowContextualMenuClick returns true, your application should generate its own menu and Apple Event descriptor (AEDesc), and then call ContextualMenuSelect to display and track the contextual menu, and then handle the user's choice.

If the mouse-down event did not invoke a contextual menu, then the application should check to see if the event occurred in the menu bar (using the FindWindow function) and, if so, call MenuSelect to allow the user to choose a command from the menu bar.

SEE ALSO
"Contextual Menu Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998